<div class="tile">
  <div class="tile-icon">
    <figure class="avatar avatar-lg" data-initial="S">
      <img src="{{ student.me.userprofile.icon.url }}" alt="...">
    </figure>
  </div>
  <div class="tile-content">
    <p class="tile-title">
      {{ student.me.first_name }}
      <span class="float-right">
        {% load student_extra %}
        {% if actions %}
        {% for action in actions|split:"," %}
          {% if action == "comment" %}
          <button class="btn circle tooltip" data-tooltip="添加评语" v-on:click="addStudentCommentModal({{teacher.pk}}, {{student.pk}}, '{{ student.me.first_name }}')"><i class="icon icon-mail"></i></button>
          {% endif %}

          {% if action == 'delete' %}
          <button class="btn circle tooltip" data-tooltip="删除该学生" v-on:click="deleteStudentModal({{teacher.pk}}, {{student.pk}})"><i class="icon icon-cross"></i></button>
          {% endif %}
        {% endfor %}
        {% endif %}
      </span>
    </p>

    <p class="tile-subtitle">{{ student.me.userprofile.desc }}</p>
    <table class="table">
      <tbody>
        {% for clz in student.classes.all %}
        <tr>
          <td>{{ clz.weekday_str }}</td>
          <td>{{ clz.begin }}</td>
          <td>{{ clz.end_time }}</td>
          <td>{{ clz.duration }}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>

    <p></p>
    {% for comment in student.comments.all %}
    <div class="tile">
      <div class="tile-content">
        <sup><i class="icon icon-bookmark text-success"></i></sup>
        <span class="label label-secondary label-rounded">{{ comment.score }}分</span>
        <span class="label label-secondary label-rounded">{{ comment.textbook.textbook }}</span>
        {{ comment.content }}
      </div>
      <div class="tile-action">
        <p>--<time>{{ comment.modify_date|date:"SHORT_DATE_FORMAT" }}</time></p>
      </div>
    </div>
    {% endfor %}

    <p>老师:
      {% for teacher in student.student_teachers.all %}
      <a href="/accounts/profile?teacher_id={{ teacher.pk }}" class="label label-primary">{{ teacher.me.first_name }}</a>
      {% endfor %}
      {% if student.student_teachers.all|length < 1 %}
      <span class="label label-primary">暂无</span>
      {% endif %}
    </p>
  </div>
</div>